#include"BankCard.h"

void menu2()
{
    int input = 0, count = 0, i = 0;
    char mima[20] = "123";//登入的密码
    char shuru[20] = { 0 };
    system("color F4");
    printf("\t\t\t     **************************************\n");
    printf("\t\t\t     |          *欢迎光临东方银行*        |\n");
    printf("\t\t\t     |           *管理员: 东方*           |\n");
    printf("\t\t\t      ------------------------------------\n");
    printf("请输入管理员密码：\n");
    while ((count = _getch()) != '\r')
    {
        if (count == '\b')
        {
            i--;
            printf("\b \b");
        }
        else
        {
            shuru[i++] = count;
            printf("*");
        }
    }
    shuru[i++] = '\0';
    if (strcmp(mima, shuru) == 0)
    {
        printf("\n密码正确，您已进入系统！\n");
    }
    else
    {
        printf("\n密码错误，请重新输入！\n");
        exit(0);     //输入错误，直接退出
    }
    system("pause");
    system("cls");
}

int main()
{
	system("color F4");
    menu2();
	BankCard bk;
	bk.BankCard_init();
	bk.menu();
	return 0;
}